import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-05
 * Time:14:30
 */
public class TestDemo {
    public static void main(String[] args) {
        int[] arr1={1,2,3,4,5};
        int arr2[]=new int [5];
        copyArray(arr1,0,arr1.length,arr2);
        System.out.println(Arrays.toString(arr2));
    }
    public static void copyArray(int[] src,int begin,int end,int[] dst){
        for (int i = begin; i < end; i++) {
            dst[i]=src[i];
        }
    }
}
